<template>
	<div>
		你好啊 这里是ComponentA
		<p class="box">
			<span>我在这！！！</span>
		</p>
	</div>
</template>

<script>
	export default {
	  beforeRouteEnter(to, from, next) {
	    console.log('6. B.beforeRouteEnter')
	    next(vm => {
	      // 这个回调会在 14 执行
	      console.log('14. B.beforeRouteEnter callback')
	      vm.someMethod()
	    })
	  },
	  beforeCreate() {
	    console.log('9. B.beforeCreate')
	  },
	  created() {
	    console.log('10. B.created')
	  },
	  beforeMount() {
	    console.log('11. B.beforeMount')
	  },
	  activated() {
	    console.log('12. B.activated (首次进入也会触发)')
	  },
	  mounted() {
	    console.log('13. B.mounted')
	  },
	  methods: {
	    someMethod() {
	      console.log('在 beforeRouteEnter 回调中调用的方法')
	    }
	  }
	}
</script>

<style scoped>
	div{
		height: 1000px;
		padding: 800px 0 100px;
	}
</style>